home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d13 / nm091.arc / EXAMPLE.BAT < prev    next >
DOS Batch File  |  1991-05-29  |  1KB  |  32 lines

  1. @echo off
  2. rem ---- Turns of the echoing of Commands to the console
  3. :TOP
  4. rem ---- A marker so we can loop back to this point later
  5. NM /B!!TEMP!! /F*.* /CDIR /2/W /TTesting_the_Now_Menu_Program! /@
  6. rem ---- Call the NM program, create a batch file called $$TEMP$$, display
  7. rem ---- a menu of all files, use the DIR command with the parameter /W
  8. rem ---- for wide display after the file spec and give it a little title
  9. rem ---- Also, the /@ parameter disable reading of the config file.
  10. if exist !!temp!!.bat goto RUN
  11. rem ---- if a file was created by NM then jump to the RUN marker to
  12. rem ---- execute the batch file we created
  13. goto EXIT
  14. rem ---- If no file was created then we are ready to quit, so go to the
  15. rem ---- exit marker
  16. :RUN
  17. rem ---- Another marker, this time for running our created batch file
  18. call !!TEMP!!
  19. rem ---- CALL the batch file (using the call command ensures that control
  20. rem ---- will return to this batch file after $$TEMP$$ executes
  21. pause
  22. rem ---- Wait until user sees result to continue on
  23. erase !!temp!!.bat
  24. rem ---- we are done with our batch file, so lets erase it
  25. cls
  26. rem ---- CLear the Screen
  27. goto TOP
  28. rem ---- Jump back to the top to run the menu system again
  29. :EXIT
  30. rem ---- Another marker, this time for the spot to exit this batch file
  31. CLS
  32. rem ---- CLear the Screen